3.362 \(\int (f x)^{-1+m} (a+b \log (c x^n))^2 \, dx\)

Optimal. Leaf size=69 \[ -\frac{2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac{(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}+\frac{2 b^2 n^2 (f x)^m}{f m^3} \]

[Out]

(2*b^2*n^2*(f*x)^m)/(f*m^3) - (2*b*n*(f*x)^m*(a + b*Log[c*x^n]))/(f*m^2) + ((f*x)^m*(a + b*Log[c*x^n])^2)/(f*m
)

________________________________________________________________________________________

Rubi [A]  time = 0.0495456, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2305, 2304} \[ -\frac{2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac{(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}+\frac{2 b^2 n^2 (f x)^m}{f m^3} \]

Antiderivative was successfully verified.

[In]

Int[(f*x)^(-1 + m)*(a + b*Log[c*x^n])^2,x]

[Out]

(2*b^2*n^2*(f*x)^m)/(f*m^3) - (2*b*n*(f*x)^m*(a + b*Log[c*x^n]))/(f*m^2) + ((f*x)^m*(a + b*Log[c*x^n])^2)/(f*m
)

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\frac{(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}-\frac{(2 b n) \int (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \, dx}{m}\\ &=\frac{2 b^2 n^2 (f x)^m}{f m^3}-\frac{2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac{(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}\\ \end{align*}

Mathematica [A]  time = 0.0221567, size = 67, normalized size = 0.97 \[ \frac{(f x)^m \left (a^2 m^2+2 b m (a m-b n) \log \left (c x^n\right )-2 a b m n+b^2 m^2 \log ^2\left (c x^n\right )+2 b^2 n^2\right )}{f m^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^(-1 + m)*(a + b*Log[c*x^n])^2,x]

[Out]

((f*x)^m*(a^2*m^2 - 2*a*b*m*n + 2*b^2*n^2 + 2*b*m*(a*m - b*n)*Log[c*x^n] + b^2*m^2*Log[c*x^n]^2))/(f*m^3)

________________________________________________________________________________________

Maple [C]  time = 0.148, size = 1008, normalized size = 14.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(-1+m)*(a+b*ln(c*x^n))^2,x)

[Out]

b^2/m*x*ln(x^n)^2*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x
)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(f)+2*ln(x)))+b*(I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*m-I*Pi*b*csgn(I
*x^n)*csgn(I*c*x^n)*csgn(I*c)*m-I*Pi*b*csgn(I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2-4*I*Pi*b^2*m
*n*csgn(I*x^n)*csgn(I*c*x^n)^2-4*I*Pi*b^2*m*n*csgn(I*c*x^n)^2*csgn(I*c)+4*I*Pi*ln(c)*b^2*m^2*csgn(I*c*x^n)^2*c
sgn(I*c)+4*I*Pi*a*b*m^2*csgn(I*x^n)*csgn(I*c*x^n)^2+4*I*Pi*a*b*m^2*csgn(I*c*x^n)^2*csgn(I*c))/m^3*x*exp(1/2*(-
1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)
*csgn(I*x)+2*ln(f)+2*ln(x)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.36628, size = 294, normalized size = 4.26 \begin{align*} \frac{{\left (b^{2} m^{2} n^{2} x \log \left (x\right )^{2} + b^{2} m^{2} x \log \left (c\right )^{2} + 2 \,{\left (a b m^{2} - b^{2} m n\right )} x \log \left (c\right ) +{\left (a^{2} m^{2} - 2 \, a b m n + 2 \, b^{2} n^{2}\right )} x + 2 \,{\left (b^{2} m^{2} n x \log \left (c\right ) +{\left (a b m^{2} n - b^{2} m n^{2}\right )} x\right )} \log \left (x\right )\right )} e^{\left ({\left (m - 1\right )} \log \left (f\right ) +{\left (m - 1\right )} \log \left (x\right )\right )}}{m^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

(b^2*m^2*n^2*x*log(x)^2 + b^2*m^2*x*log(c)^2 + 2*(a*b*m^2 - b^2*m*n)*x*log(c) + (a^2*m^2 - 2*a*b*m*n + 2*b^2*n
^2)*x + 2*(b^2*m^2*n*x*log(c) + (a*b*m^2*n - b^2*m*n^2)*x)*log(x))*e^((m - 1)*log(f) + (m - 1)*log(x))/m^3

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**(-1+m)*(a+b*ln(c*x**n))**2,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [B]  time = 1.40299, size = 267, normalized size = 3.87 \begin{align*} \frac{b^{2} f^{m} n^{2} x^{m} \log \left (x\right )^{2}}{f m} + \frac{2 \, b^{2} f^{m} n x^{m} \log \left (c\right ) \log \left (x\right )}{f m} + \frac{b^{2} f^{m} x^{m} \log \left (c\right )^{2}}{f m} + \frac{2 \, a b f^{m} n x^{m} \log \left (x\right )}{f m} - \frac{2 \, b^{2} f^{m} n^{2} x^{m} \log \left (x\right )}{f m^{2}} + \frac{2 \, a b f^{m} x^{m} \log \left (c\right )}{f m} - \frac{2 \, b^{2} f^{m} n x^{m} \log \left (c\right )}{f m^{2}} + \frac{a^{2} f^{m} x^{m}}{f m} - \frac{2 \, a b f^{m} n x^{m}}{f m^{2}} + \frac{2 \, b^{2} f^{m} n^{2} x^{m}}{f m^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

b^2*f^m*n^2*x^m*log(x)^2/(f*m) + 2*b^2*f^m*n*x^m*log(c)*log(x)/(f*m) + b^2*f^m*x^m*log(c)^2/(f*m) + 2*a*b*f^m*
n*x^m*log(x)/(f*m) - 2*b^2*f^m*n^2*x^m*log(x)/(f*m^2) + 2*a*b*f^m*x^m*log(c)/(f*m) - 2*b^2*f^m*n*x^m*log(c)/(f
*m^2) + a^2*f^m*x^m/(f*m) - 2*a*b*f^m*n*x^m/(f*m^2) + 2*b^2*f^m*n^2*x^m/(f*m^3)